/**
 * Created on 20.04.2012
 */
package com.example.ejb.exceptions;

/**
 * @author Ciprian Mihalache
 * 
 */
public class UserAlreadyExistsException extends Exception {
	private static final long serialVersionUID = 2009143555397060418L;

	public UserAlreadyExistsException() {
		super();
	}

	public UserAlreadyExistsException(String message, Throwable cause) {
		super(message, cause);
	}

	public UserAlreadyExistsException(String message) {
		super(message);
	}

	public UserAlreadyExistsException(Throwable cause) {
		super(cause);
	}
	
	@Override
	public String getMessage() {
		String specifiedMessage = super.getMessage();
		if(specifiedMessage != null) {
			return specifiedMessage;
		}
		return "The user already exists in the database";
	}
}
